package com.xuanzheng.company.util;

import java.util.Random;

/**
 * ID生成器，生成10位唯一标识符
 */
public class IdGenerator {
    private static final String CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    private static final int ID_LENGTH = 10;
    private static final Random RANDOM = new Random();
    
    /**
     * 生成10位唯一标识符
     */
    public static String generateId() {
        StringBuilder sb = new StringBuilder(ID_LENGTH);
        for (int i = 0; i < ID_LENGTH; i++) {
            sb.append(CHARS.charAt(RANDOM.nextInt(CHARS.length())));
        }
        return sb.toString();
    }
} 